package model

import "encoding/json"

type Profile struct {
	Name          string
	Gender        string
	BasicMessage  []string
	ExpendMessage []string
	ExpectMessage []string
}

func FromJsonObj(o interface{}) (Profile, error) {
	// 先转string再转profile
	var profile Profile
	s, err := json.Marshal(o)
	if err != nil {
		return profile, err
	}
	err = json.Unmarshal(s, &profile)
	return profile, err
}
